<?php
use think\facade\Route;


/**
 * 数据 相关路由
 */
Route::group('analysis', function () {
    //积分相关
    Route::get('score/overview', 'v1.analysis.Score/overview')->name('overview')->option(['real_name' => '总览']);
    Route::get('score/usable_detail', 'v1.analysis.Score/usable_detail')->name('usableDetail')->option(['real_name' => '用户可用积分分布']);
    Route::get('score/income_detail', 'v1.analysis.Score/income_detail')->name('incomeDetail')->option(['real_name' => '累计发放积分分布']);
    Route::get('score/outcom_detail', 'v1.analysis.Score/outcom_detail')->name('outcomDetail')->option(['real_name' => '累计消耗积分分布']);
    Route::get('score/year_detail', 'v1.analysis.Score/year_detail')->name('yearDetail')->option(['real_name' => '年份统计']);

    //客户相关
    Route::get('user/overview', 'v1.analysis.User/overview')->name('overview')->option(['real_name' => '总览']);
    Route::get('user/add_detail', 'v1.analysis.User/add_detail')->name('addDetail')->option(['real_name' => '客户新增分布']);
    Route::get('user/active_date_detail', 'v1.analysis.User/active_date_detail')->name('activeDateDetail')->option(['real_name' => '客户活跃日期']);
    Route::get('user/active_time_detail', 'v1.analysis.User/active_time_detail')->name('activeTimeDetail')->option(['real_name' => '客户活跃时间']);
    Route::get('user/read_detail', 'v1.analysis.User/read_detail')->name('readDetail')->option(['real_name' => '客户浏览商品']);
    Route::get('user/collect_detail', 'v1.analysis.User/collect_detail')->name('collectDetail')->option(['real_name' => '客户收藏商品']);
    Route::get('user/buy_detail', 'v1.analysis.User/buy_detail')->name('buyDetail')->option(['real_name' => '客户购买商品']);


})->middleware([
    \app\http\middleware\AllowOriginMiddleware::class,
    \app\adminapi\middleware\AdminAuthTokenMiddleware::class,
    \app\adminapi\middleware\AdminCheckRoleMiddleware::class,
    \app\adminapi\middleware\AdminLogMiddleware::class
])->option(['mark' => 'diy', 'mark_name' => '页面装修']);
